{include file="public/header" /}
<title>管理员列表</title>
</head>
<body>
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 客户管理 <span class="c-gray en">&gt;</span> 客户列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="page-container">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
                <tr>
                    <th scope="col" colspan="9">人员列表</th>
                </tr>
                <tr class="text-c">
                    <!--<th width="25"><input type="checkbox" name="" value=""></th>-->
                    <th width="40">id</th>
                    <th width="40">姓名</th>
                    <th width="150">手机号</th>
                    <th width="150">邀请人数</th>
                    <th width="150">注册时间</th>
                    <th width="100">用户状态</th>
                </tr>
            </thead>
            <tbody>
                <tr class="text-c">
                    <!--<td><input type="checkbox" value="1" name=""></td>-->
                    <td>{$user.id}</td> 
                    <td>{$user.real_name}</td> 
                    <td>{$user.phone}</td> 
                    <td>{$count}</td> 
                    <td>{$user.time|date="Y-m-d H:i:s",###}</td>
                    {if condition="$user.status eq 0"}
                    <td>启用</td>
                    {elseif/ condition="$user.status eq 1"}
                    <td>禁用</td>
                    {/if}
                </tr>

            </tbody>
        </table>
    </div>
    <!--_footer 作为公共模版分离出去-->
    {include file="public/footer" /}

    <!--请在下方写此页面业务相关的脚本-->
    <script type="text/javascript" src="__ROOT__/static/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
    <script type="text/javascript" src="__ROOT__/static/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
    <script type="text/javascript" src="__ROOT__/static/admin/lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript">
                            $('.table-sort').dataTable({
                                "aaSorting": [[1, "desc"]], //默认第几个排序
                                "bStateSave": true, //状态保存
                                "aoColumnDefs": [
                                    //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                                    {"orderable": false, "aTargets": [0]}// 制定列不参与排序
                                ]
                            });
                            function image_del(obj, id) {
                                layer.confirm('确认要提升为代理吗？', function (index) {
                                    $.ajax({
                                        type: 'POST',
                                        url: "{:url('admin/client/promote')}",
                                        data: {id: id},
                                        dataType: 'json',
                                        success: function (data) {
                                            $(obj).parents("tr").remove();
                                            layer.msg('已提升!', {icon: 1, time: 1000});
                                        },
                                        error: function (data) {
                                            layer.msg('提升失败!', {icon: 1, time: 1000});
                                        },
                                    });
                                });
                            }


    </script>
</body>
</html>